import { defineStore } from 'pinia';
import { ref } from 'vue';

const useLoginStore = defineStore(
  'login',
  () => {
    const token = ref('');

    const setToken = (tokenValue: string) => {
      token.value = tokenValue;
    };

    return {
      token,
      setToken
    };
  },
  {
    persist: true
  }
);

export default useLoginStore;
